<template>
<div class="back">
  <i class="iconfont icon-left" @click="back"></i>
  <span>{{topTitle}}</span>
</div>
</template>

<script>
export default {
  name: 'back',
  props: {
    topTitle: String
  },
  data () {
    return {
    }
  },
  methods: {
    back () {
      history.back(1)
    }
  }
}
</script>

<style lang="scss" scoped>
@import "~css/fglz.scss";
  .back{
    position: relative;
    display: flex;
    @include container-width-height(100%,40px);
    background: $color-gray-item7;
    justify-items: left;
    align-items: center;
    >i{
      position: absolute;
      top: 5px;
      left: 0;
      @include text-variant(28px,$color-gray-item2,left);
    }
    >span{
      display: inline-block;
      @include container-width-height(100%,auto);
      @include text-variant(16px,$color-gray-item1,center);
    }
  }
</style>
